home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / rexx / imc / rexx-imc.5 / globals.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-06-25  |  5.3 KB  |  83 lines

  1. /* The external variables of REXX/imc          (C) Ian Collier 1992 */
  2.  
  3. #include<stdio.h>                  /* since a FILE will occur later */
  4. #include <setjmp.h>                /* since a jmp_buf will occur later */
  5. extern int types[];                /* Three character type tables */
  6. extern int alphs[];
  7. extern int symbs[];
  8. extern char fname[];               /* the current file name */
  9. extern char extension[];           /* the default file extension */
  10. extern int extlen;                 /* and its length */
  11. extern int lines;                  /* number of lines in current source */
  12. extern int stmts;                  /* number of statements in current program*/
  13. extern char **source;              /* the source of the current program */
  14. extern program *prog;              /* the current program, tokenised */
  15. extern char *labelptr;             /* start of label table */
  16. extern char *vartab;               /* start of variable table */
  17. extern int *varstk;                /* offsets to levels in variable table */
  18. extern unsigned varstklen;         /* number of elements allocated to varstk */
  19. extern unsigned vartablen;         /* space allocated to vartab */
  20. int varstkptr;                     /* current level number */
  21. extern char *cstackptr;            /* start of calculator stack */
  22. extern unsigned ecstackptr;        /* length of calculator stack */
  23. extern unsigned cstacklen;         /* space allocated to calculator stack */
  24. extern char *workptr;              /* start of workspace */
  25. extern unsigned eworkptr;          /* amount of workspace used */
  26. extern unsigned worklen;           /* space allocated to workspace */
  27. extern char *pstackptr;            /* start of program stack */
  28. extern unsigned epstackptr;        /* length of program stack */
  29. extern unsigned pstacklen;         /* space allocated to program stack */
  30. extern int pstacklev;              /* prog stack level within current func */
  31. extern int totpstacklev;           /* total program stack level */
  32. extern char* hashptr[];            /* pointers to 3 hash tables */
  33. extern unsigned ehashptr[];        /* lengths of hash tables */
  34. extern unsigned hashlen[];         /* space allocated to hash tables */
  35. extern struct sigstruct {          /* contexts of all calls to interpreter() */
  36.        short bits;                 /* and which signals to catch by default */
  37.        short bitson;               /* which signals are caught here */
  38.        short callon;               /* which signals cause a call */
  39.        short delay;                /* which signals are set to "delay" */
  40.        char type;                  /* condition(i) 0=none, 1=signal, 2=call */
  41.        char which;                 /* condition(c) */
  42.        char *data;                 /* condition(d) */
  43.      int ppc[Imax];            /* number of the SIGNAL ON instruction */
  44.          jmp_buf jmp;              /* for each signal */
  45.       } *sgstack;
  46. extern int delayed[Imax];          /* Which signals are pending action */
  47. extern char *sigdata[Imax];        /* Descriptions for pending signals */
  48. extern jmp_buf interactbuf;        /* context of interactive trace routine */
  49. extern int interplev;              /* nesting level of interpreter() */
  50. extern int interact;               /* interplev of interactive trace, or -1 */
  51. extern int interactmsg;            /* Whether to emit message at interactive */
  52. extern int ppc;                    /* statement number being interpreted */
  53. extern int oldppc;                 /* saved position in case of error */
  54. extern int newppc;                 /* statement to jump to */
  55. extern char **curargs;             /* current arguments, for ARG() */
  56. extern int *curarglen;             /* lengths of current arguments */
  57. extern char *errordata;            /* data to print after error message */
  58. extern int precision;              /* NUMERIC DIGITS */
  59. extern int fuzz;                   /* NUMERIC DIGITS minus NUMERIC FUZZ */
  60. extern char numform;               /* 0=SCIENTIFIC, 1=ENGINEERING */
  61. extern char trcflag;               /* what to trace */
  62. extern char trcresult;             /* nesting level of scanning() */
  63. extern char otrcflag;              /* temporary store for trace flag */
  64. extern char trclp;                 /* whether to input in interactive mode */
  65. extern char timeflag;              /* bit 0: used elapsed time counter */
  66.                                    /* bit 1: timestamp in operation */
  67.                        /* bit 2: used random number generator */
  68. extern long secs;extern long microsecs; /* time when TIME(r) last called */
  69. extern struct timeval timestamp;   /* the timestamp, if in operation */
  70. extern FILE *ttyin,*ttyout;        /* access to the terminal */
  71. extern char *pull;                 /* storage used for input */
  72. extern unsigned pulllen;           /* space allocated for pull */
  73. extern char *returnval;            /* value returned by EXIT */
  74. extern int returnlen;              /* length of that value */
  75. extern char *returnfree;           /* what to free after returnval is used */
  76. extern int rxstacksock;            /* fd number of stack socket */
  77. extern char *varnamebuf;           /* workspace for evaluating variable names*/
  78. extern int varnamelen;             /* amount of memory allocated for this */
  79. extern FILE *traceout;             /* Where to send trace output */
  80. extern int lasterror;              /* The last error which occurred on I/O */
  81.  
  82. extern char *conditions[];         /* the condition names */
  83.